Skip to content

[16.0][ADD] pricelist_price_base_custom: add module#3039

Merged
OCA-git-bot merged 1 commit intoOCA:16.0from
cetmix:16.0-t3469-pricelist_price_base_custom
Nov 20, 2025
Merged

[16.0][ADD] pricelist_price_base_custom: add module#3039
OCA-git-bot merged 1 commit intoOCA:16.0from
cetmix:16.0-t3469-pricelist_price_base_custom

Conversation

@dmitriypaulov
Copy link
Copy Markdown

This is a technical module that makes possible to use custom base_price (e.g. from external sources) in your product prices computation

@dmitriypaulov dmitriypaulov marked this pull request as draft March 25, 2024 12:09
Comment thread pricelist_price_base_custom/models/product_pricelist.py Outdated
Comment thread pricelist_price_base_custom/models/product_pricelist_item.py Outdated
Copy link
Copy Markdown

@angelinaanaki angelinaanaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

Comment thread pricelist_price_base_custom/models/product_pricelist_item.py Outdated
@pedrobaeza
Copy link
Copy Markdown
Member

This is already implemented in https://github.com/OCA/product-attribute/tree/15.0/product_multi_price

Copy link
Copy Markdown
Member

@ivs-cetmix ivs-cetmix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review LGTM

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Comment thread pricelist_price_base_custom/models/product_pricelist_item.py Outdated
Copy link
Copy Markdown

@angelinaanaki angelinaanaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@dmitriypaulov dmitriypaulov marked this pull request as ready for review June 25, 2024 13:52
@ivs-cetmix ivs-cetmix force-pushed the 16.0-t3469-pricelist_price_base_custom branch from aeb888b to 34d3ab4 Compare August 7, 2024 14:56
@ivs-cetmix
Copy link
Copy Markdown
Member

Hey dear @OCA/crm-sales-marketing-maintainers !

What's a great day to merge this small but nice PR. Isn't it? 😄

passed in context
"""
if self.base == "custom_value":
return (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this is not correct.

A price from a context value is always a bad practice. Don't you have another mean to do so ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this is not correct.

A price from a context value is always a bad practice. Don't you have another mean to do so ?

hi @rousseldenis, thank you for the feedback! yup I share the same concerns. However this was the less intrusive to achieve the objective.
Otherwise there would be much more code because of the function param override.

Comment thread pricelist_price_base_custom/models/product_pricelist_item.py Outdated
@ivs-cetmix ivs-cetmix force-pushed the 16.0-t3469-pricelist_price_base_custom branch 2 times, most recently from da392d7 to 1c84b46 Compare October 8, 2025 19:44
@ivs-cetmix
Copy link
Copy Markdown
Member

Hi @rousseldenis , thank you once again for your assistance! I've applied your suggestions, would appreciate the final (hope so 😄 ) review.

Comment thread pricelist_price_base_custom/models/product_pricelist_item.py Outdated
@ivs-cetmix
Copy link
Copy Markdown
Member

ok, @rousseldenis please check again 😆

@ivs-cetmix ivs-cetmix force-pushed the 16.0-t3469-pricelist_price_base_custom branch from b92defd to 19f2087 Compare October 9, 2025 15:17
This is a technical module that makes possible to use custom base_price (e.g. from external sources) in your product prices computation
@ivs-cetmix ivs-cetmix force-pushed the 16.0-t3469-pricelist_price_base_custom branch from 19f2087 to 4129115 Compare October 9, 2025 15:41
@rousseldenis
Copy link
Copy Markdown
Contributor

This is already implemented in https://github.com/OCA/product-attribute/tree/15.0/product_multi_price

@dmitriypaulov @ivs-cetmix Have you checked this ?

@ivs-cetmix
Copy link
Copy Markdown
Member

This is already implemented in https://github.com/OCA/product-attribute/tree/15.0/product_multi_price

Have you checked this ?

@rousseldenis yes, I did. The difference between these modules is that our module is more technical and it's designed to be a part of external flows where you need to calculate a custom price from code.
While the module you reference is more rather functional with everything being adjusted from the UI.
So although they may look similar, they are not the same.

@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3039-by-rousseldenis-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5afae64 into OCA:16.0 Nov 20, 2025
14 of 15 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 3a51486. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants